import Vue from 'vue'
import Router from 'vue-router'
import {routers} from './router';
import {LoadingBar} from 'at-ui'

Vue.use(Router)
// 路由配置
const RouterConfig = {
    // mode: 'history',
    routes: routers
};
const router = new Router(RouterConfig);

router.beforeEach((to, from, next) => {
    LoadingBar.start()
    next()
})

router.afterEach((to, from, next) => {
    LoadingBar.finish()
})

export default router

